<template>
  <div>
    <Header :title=title><i class="el-icon-arrow-left" @click="$global.goPage('/mine')"></i> </Header>
    <el-card :body-style="{padding:'0'}" v-for="(item, id) in myMovDetail" :key="id">
      <img :src="item.img|setWH('128.180')" class="image">
      <div class="contain" @click="$global.goPage('/detail/'+item.id)">
        <h1>{{item.nm}}</h1>
        <h2 v-if="item.globalReleased&&item.sc!=0">观众评<span class="yspan">{{item.sc}}</span></h2>
        <h2><span class="yspan">{{item.wish}}</span>人想看</h2>
        <h3>主演：{{item.star}}</h3>
        <h4>上映日期：{{item.rt}}</h4>
      </div>
    </el-card>
  </div>

</template>

<script>
import {mapState} from 'vuex'
import Header from "../../../components/Header";
export default {
  name: "fav",
  data(){
    return{
      title:this.$route.params.title,
    }
  },
  components: {Header},
  computed:{...mapState({
      myMovDetail:state=>state.movie.MymovDetail,
    })},
  beforeCreate() {
    this.$store.dispatch('movie/movSearchW',
      {uid:window.localStorage.getItem('id'),type:this.title==='我的想看'?1:2})
  }
}
</script>

<style scoped>

</style>
